<!DOCTYPE html>
<html lang="en" class="bg-dark">
<head>
<meta charset="utf-8" />
<title>登录</title>
<meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<iframe id="PUBLIC" name="PUBLIC" src="/application/admin/controller/Api.class.php" style="width:0px;height:0px"></iframe>
<link rel="stylesheet" href="__PUBLIC__/app/admin/css/app.v2.css" type="text/css" />
<link rel="stylesheet" href="__PUBLIC__/app/admin/css/font.css" type="text/css" cache="false" />
<!--[if lt IE 9]> <script src="js/ie/html5shiv.js" cache="false"></script> <script src="js/ie/respond.min.js" cache="false"></script> <script src="js/ie/excanvas.js" cache="false"></script> <![endif]-->
</head>
<body>
<section id="content" class="m-t-lg wrapper-md animated fadeInUp">
  <div class="container aside-xxl"> <a class="navbar-brand block" href="index.html">会员管理系统</a>
    <section class="panel panel-default bg-white m-t-lg">
      <header class="panel-heading text-center"> <strong>登录</strong> </header>
      <form  class="panel-body wrapper-lg">
        <div class="form-group">
          <label class="control-label">用户名</label>
          <input type="text" placeholder="请输入用户名" class="form-control input-lg" id="username">
        </div>
        <div class="form-group">
          <label class="control-label">密码</label>
          <input type="password" id="pwd" placeholder="请输入密码" class="form-control input-lg">
        </div>
        <!-- <div class="checkbox">
          <label>
            <input type="checkbox">
            Keep me logged in </label>
        </div> -->
        <button type="button" class="btn btn-primary" onclick="submit_login()">登录</button>
        <!-- <div class="line line-dashed"></div>
        <a href="#" class="btn btn-facebook btn-block m-b-sm"><i class="fa fa-facebook pull-left"></i>Sign in with Facebook</a> <a href="#" class="btn btn-twitter btn-block"><i class="fa fa-twitter pull-left"></i>Sign in with Twitter</a>
        <div class="line line-dashed"></div>
        <p class="text-muted text-center"><small>Do not have an account?</small></p>
        <a href="signup.html" class="btn btn-default btn-block">Create an account</a> -->
      </form>
    </section>
  </div>
</section>
<!-- footer -->
<footer id="footer">
  <div class="text-center padder">
    <p> <small>Copyright © 2017 会员管理系统<br>
     </small> </p>
  </div>
</footer>
<!-- / footer --> <script src="__PUBLIC__/app/admin/js/app.v2.js"></script> <!-- Bootstrap --> <!-- App -->
</body>
</html>

<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>

<script type="text/javascript">
	

	function submit_login(){
	var username=$('#username').val();
	var password=$('#pwd').val();
	var url="{:U('Login/checkLogin')}";
	$.post(url,{'username':username,'pwd':password},function(data){
		if(data.status<0){
			layer.msg(data.info);
		}else{
			layer.msg(data.info);
			setTimeout(function(){
				window.location.href="{:url('Index/index')}";
			},2000);
		}
		
	});


}

</script>
